using System;
using System.Collections.Generic;
using System.Text;
using System.Data;using THSERP.BusinessEntities;using THSERP.BaseProvider;
using System.Windows.Forms;

namespace THSERP.Modules.EmployeeConfig
{
    public class HRDepartmentsGridControl : THSGridControl
    {
        public override void InitGridControlDataSource()
        {
            EmployeeConfigEntities entity = (EmployeeConfigEntities)((BaseModuleERP)Screen.Module).CurrentModuleEntity;
            BindingSource bds = new BindingSource();
            bds.DataSource = entity.HRDepartmentsList;
            this.DataSource = bds;

            HRDepartmentsController objDepartmentsController = new HRDepartmentsController();
            DataSet ds = objDepartmentsController.GetAllObjects();
            entity.HRDepartmentsList.Invalidate(ds);
        }
    }
}
